
Purpose
This project centers on the exploration of various techniques to design visually appealing and comprehensible data tables. It is a well-known fact that the conventional format of Excel spreadsheets can be tedious and challenging to read. As such, the project aims to investigate alternative ways of presenting data in tables that are both aesthetically pleasing and easy to understand.
By utilizing various design principles such as color theory, typography, and layout, we seek to create data tables that are visually striking and convey information effectively. Additionally, the project involves the evaluation of different software tools and platforms that offer innovative and user-friendly options for creating data tables.
It is crucial to recognize that the presentation of data plays a significant role in its interpretation and understanding. The traditional Excel format may not provide sufficient visual cues to highlight key data points or insights. Therefore, this project seeks to address this limitation by exploring new and innovative methods of presenting data tables that are both functional and visually appealing.
Advanced Data Tables
DT Table Code
ds_starter <- ds %>%
mutate(province = as.factor(province),
price = price,
thetaPointMean = mean(points),
thetaPriceMean = mean(price))
ds_starter %>%
arrange(province, year) %>%
select(Province = province,
Year = year,
Price = price,
Points = points,
Description = description) %>%
datatable(.,
filter = "bottom",
extensions = 'Buttons',
options = list(dom = 'Bfrtip',
buttons = c('copy', 'csv', 'excel'),
initComplete = JS("function(settings, json) {",
"$(this.api().table().header()).css({'background-color': '#131F4F', 'color': '#fff'});",
"}")))Adding Statistical Visuals To Summary Tables
GT Table Code
fancyTbl <- ds_summary %>%
gt() %>%
# format the numeric output to 3 digit rounding
fmt_number(columns = c(pointsMean, pointsSD, priceMean, priceSD),
decimals = 3) %>%
# create nice labels for a few ugly variable names
cols_label(province = "Province",
pointsMean = "Avg. Points",
pointsSD = "Std. Dev. Points",
priceMean = "Avg. Price",
priceSD = "Std. Dev. Price",
points = "Points Trend",
price = "Price Trend",) %>%
# Plot the sparklines from the list column
gt_plt_sparkline(points,
type="ref_median",
same_limit = TRUE
) %>%
gt_plt_sparkline(price,
type="ref_median",
same_limit = TRUE
) %>%
# use the guardian's table theme
gt_theme_guardian() %>%
# give hulk coloring to the Mean Human Rights Score
gt_hulk_col_numeric(pointsMean) %>%
gt_hulk_col_numeric(priceMean) %>%
# create a header and subheader
tab_header(title="Province Pinot Wine Summary", subtitle = "Source: Dr. Hendrick") %>%
# attach excel file
tab_source_note(excel_file_attachment)
# save the original as an image
#gtsave(fancyTbl, "table.png")
# show the table themed in accordance with the page
fancyTblConclusion
The objective of this endeavor is to create a thorough and all-encompassing compilation of principles and instructions for crafting data tables that are simple to interpret and comprehend. By employing these guidelines, our aim is to enhance the usability and accessibility of data tables across a broad spectrum of applications and sectors.